// -----------------------------------------------------------------
// Board
// -----------------------------------------------------------------

.LiveMemory {
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  background: rgb(var(--color-background-rgb) / 75%);
  align-self: start;
  margin-block-start: 3rem;
}

.LiveMemory-Board {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

.LiveMemory-Main {
  display: grid;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 1vmin;
  background: rgb(var(--color-background-rgb) / 50%);
  border: 1px solid var(--color-border);
  width: 100%;
  aspect-ratio: 1.85 / 1;
}
@media screen and (orientation: portrait) {
  .LiveMemory-Main {
    aspect-ratio:  1 / 1.85;
  }
}

.LiveMemory-Tableau {
  position: relative;
  justify-self: normal;
  align-self: normal;
  display: grid;
}

.LiveMemory-Cards {
  --card-space: .5rem;
  --cards-x: var(--deck-x);
  --cards-y: var(--deck-y);
  --cards-r: calc(var(--cards-x) / var(--cards-y));

  grid-template-columns: repeat(var(--cards-x), 1fr);
  grid-template-rows: repeat(var(--cards-y), 1fr);

  display: grid;
  aspect-ratio: var(--cards-r);
}

.LiveMemory-CardSlot {
  padding: .5rem;
  position: relative;
  display: grid;
  align-content: center;
}

@media screen and (min-width: 768px) {
  .LiveMemory-Cards {
    height: calc(100% - (2 * var(--card-space)));
    margin-block: var(--card-space);
    max-width: 100%;
    justify-self: center;
  }
}

@media screen and (max-width: 768px) {
  .LiveMemory-Main {
    aspect-ratio: 1 / 1.85;
  }
  .LiveMemory-Cards {
    --cards-x: var(--deck-y);
    --cards-y: var(--deck-x);

    width: calc(100% - (2 * var(--card-space)));
    padding-inline: var(--card-space);
    align-self: center;
  }
}

.LiveMemory-Scores {
  position: absolute;
  inset: 0;
}

.LiveMemory-Footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  line-height: .5rem;
  word-spacing: -.125rem;
  mix-blend-mode: color-burn;
  font-size: .65rem;
  font-weight: lighter;
  font-family: monospace;
  text-transform: uppercase;
  --footer-color: var(--color-text);
  --footer-color-subtle: var(--color-text);
}
[data-bs-theme="dark"] .LiveMemory-Footer {
  mix-blend-mode: overlay;
}

.LiveMemory-Footer span:first-child {
  text-align: left;
}
.LiveMemory-Footer span:last-child {
  text-align: right;
}
.LiveMemory-Footer > span {
    text-align: center;
}
.LiveMemory-Footer a {
  font-weight: lighter;
  text-align: center;
  color: var(--footer-color);
}
.LiveMemory-Footer a:hover {
  color: inherit;
  opacity: 1;
  text-decoration: underline;
}

